home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8576 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  47 lines

  1. Path: francenet.fr!usenet
  2. From: madbrain@micronet.fr (Julien Pierre)
  3. Newsgroups: comp.lang.c++,comp.os.os2.programmer.oop
  4. Subject: Nested classes
  5. Date: Sat, 17 Feb 1996 03:03:17 -0500
  6. Organization: Francenet -- Paris, France
  7. Message-ID: <FvYJxQxFKpkc084yn@micronet.fr>
  8. NNTP-Posting-Host: ppp79.micronet.fr
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=ISO-8859-1
  11. Content-Transfer-Encoding: 8bit
  12.  
  13. I am trying to compile the following code :
  14.  
  15. class DMPWindow
  16. {
  17.    friend class Parameters;
  18.    private:
  19.    class Parameters
  20.    {
  21.       private:
  22.       class Handler
  23.       {
  24.          public:
  25.                 Handler(DMPWindow :: Parameters& winhandle);
  26.       };
  27.    };
  28. };
  29.  
  30. I get the following error with IBM C Set ++ :
  31.  
  32.    11       |                Handler(DMPWindow :: Parameters& winhandle);
  33. NESTED.CPP(11:1) : error EDC3016: private member "DMPWindow::Parameters" cannot
  34. be accessed.
  35.  
  36. When I compile with Watcom there is no error.
  37. If I make the DMPWindow :: Parameters class public, all is well even with IBM C Set ++,
  38. but I want it to remain private.
  39. What am I doing wrong ? I've made DMPWindow a friend of Parameters, so it
  40. shouldn't happen. What should I do ? Is this an IBM bug ?
  41.  
  42. //----------------------------------------------------------------------------
  43. // Julien R. Pierre
  44. // Certified OS/2 Engineer
  45. // OS/2 Multimedia Developer - using IBM C Set ++
  46. // http://www.polsci.wvu.edu/Henry/Madbrain - Phone +33-1-30471798. 
  47.